package top.chenyaohua.http;

public class ResponseContextHandler {

    private static final ThreadLocal<HttpResponse> http = ThreadLocal.withInitial(()->null);

    protected static void setHttpResponse(HttpResponse httpResponse){
        http.set(httpResponse);
    }

    public static HttpResponse getHttpResponse(){
        return http.get();
    }

    protected static void removeHttpResponse(){
        http.remove();
    }

}
